﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelData.aspx.cs" Inherits="GPCSC.Web.CM.SelData" %>

<%@ Register Assembly="NickLee.Web.UI" Namespace="NickLee.Web.UI" TagPrefix="NickLee" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>淮安市领导干部下基层活动网站</title>
<meta name="KEYWords" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
<meta name="DEscription" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
<link type="text/css" rel="Stylesheet" href="../Css/tableCss.css" />
<link href="../Css/main.css" rel="stylesheet" type="text/css" /><link type="text/css" rel="Stylesheet" href="../Css/selectCss.css" />
   <script type="text/javascript" src="../scripts/jquery-1.6.2.min.js"></script>
                              <script type="text/javascript"  src="../Scripts/jquery-ui-1.8.16.custom.min.js"> </script>
                      <link href="../Css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
       <script type="text/javascript" src="../Scripts/validator/jquery.validate.min.js"></script>
<script type="text/javascript" src="../Scripts/validator/messages_cn.js"></script>
   <script type ="text/javascript" src ="../scripts/datepicker/WdatePicker.js"></script>
<style>
body
{
	font-size:12px;
	margin:0px;
}
 .style1
      {
          /*border-right: 1px solid #C1DAD7;*/border: 1px solid #C1DAD7;
          background: #F9FDFE;
          font-size: 12px;
          padding: 3px 3px 3px 3px;
          text-align: center;
          vertical-align: middle;
          color: #0161a1;
          font-style: normal;
          font-variant: normal;
          font-weight: normal;
          line-height: normal;
          font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
          height: 19px;
      }
      .style2
      {
          /*border-right: 1px solid #C1DAD7;*/border: 1px solid #C1DAD7;
          background: #F9FDFE;
          font-size: 12px;
          padding: 3px 3px 3px 3px;
          text-align: center;
          vertical-align: middle;
          color: #0161a1;
          font-style: normal;
          font-variant: normal;
          font-weight: normal;
          line-height: normal;
          font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
          height: 25px;
      }
            	.dwlist{
		position:absolute;
		left:250px;
		top:30px;
		margin-top:80px;
		width:540px;
		background:white;
		border:2px solid gray;
		background:#F9FDFE;				
		padding:0px 10px 10px 10px;
		display:none;
		font-size:14px;
	}
      .style3
      {
          /*border-right: 1px solid #C1DAD7;*/border: 1px solid #C1DAD7;
          background: #fff;
          font-size: 12px;
          padding: 3px 3px 3px 3px;
          text-align: left;
          vertical-align: middle;
          color: #0161a1;
          font-style: normal;
          font-variant: normal;
          font-weight: normal;
          line-height: normal;
          font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
          height: 25px;
      }
	  .utb{
	  
	  border: 1px solid #E2F5BC;

 table-layout:auto;   

    empty-cells:show;    

    border-collapse: collapse;   

    margin:0 auto; 
	}
		.dwlist{
		position:absolute;
		left:250px;
		top:30px;
		margin-top:80px;
		width:540px;
		background:white;
		border:2px solid gray;
		background:#F9FDFE;				
		padding:0px 10px 10px 10px;
		display:none;
		font-size:14px;
	}
	.dwlist div{
		height:24px;
		line-height:24px;
		font-weight:bold;
		margin:0px;
		padding:0px;
	}
	a
	{
	    text-decoration:none;
	    }
</style>
<script>

    function offren() {
        $("#selector").dialog({
            dialogClass: "my-dialog",
            modal: true,
            width: 800,
            height: 600
        });
    }

    
</script>
<script language="javascript">    // Example: obj = findObj("image1");

    function findObj(theObj, theDoc) {
        var p, i, foundObj;
        if (!theDoc) theDoc = document;
        if ((p = theObj.indexOf("?")) > 0 && parent.frames.length)
        { theDoc = parent.frames[theObj.substring(p + 1)].document; theObj = theObj.substring(0, p); } if (!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i = 0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for (i = 0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj, theDoc.layers[i].document); if (!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj;
    }
    //添加一个参与人填写行
    function AddSignRow() {
        //条件
        var gjct = $("#gjc").find(":selected").text();
        var gjc = $("#gjc").val();

        var tjt = $("#tj").find(":selected").text();
        var tjc = $("#tj").val();

        var sj = $("#sj").val();

        if (gjc == "null" || tj == "null" || sj == "") {
            alert("请填写完整的信息");
        }
        else {

            var sqls = gjc + tjc + sj;

    //读取最后一行的行号，存放在txtTRLastIndex文本框中 
        var txtTRLastIndex = findObj("txtTRLastIndex", document);
        var rowID = parseInt(txtTRLastIndex.value);

        var signFrame = findObj("SignFrame", document);
        //添加行
        var newTR = signFrame.insertRow(signFrame.rows.length);
        newTR.id = "SignItem" + rowID;

        //添加列:序号
        var newNameTD = newTR.insertCell(0);
        //添加列内容
        newNameTD.innerHTML = newTR.rowIndex.toString();

        //添加列:关键字
        var newNameTD = newTR.insertCell(1);
        //添加列内容
        newNameTD.innerHTML = gjct;

        //添加列:条件
        var newEmailTD = newTR.insertCell(2);
        //添加列内容
        newEmailTD.innerHTML = tjt;

        //添加列:数据
        var newTelTD = newTR.insertCell(3);
        //添加列内容
        newTelTD.innerHTML = sj;
        var hedd = newTR.insertCell(4);
        //添加列内容
        hedd.innerHTML = "<input type='text' groups='ye' value='" + sqls + "' />";
   

        //添加列:删除按钮
        var newDeleteTD = newTR.insertCell(5);
        //添加列内容
        newDeleteTD.innerHTML = "<div align='center' style='width:40px'><a href='javascript:;' onclick=\"DeleteSignRow('SignItem" + rowID + "')\">删除</a></div>";

        //将行号推进下一行
        txtTRLastIndex.value = (rowID + 1).toString();
        }
    }
    //删除指定行
    function DeleteSignRow(rowid) {

    
        var signFrame = findObj("SignFrame", document);
        var signItem = findObj(rowid, document);

        //获取将要删除的行的Index
        var rowIndex = signItem.rowIndex;

        //删除指定Index的行
        signFrame.deleteRow(rowIndex);

        //重新排列序号，如果没有序号，这一步省略
        for (i = rowIndex; i < signFrame.rows.length; i++) {
            signFrame.rows[i].cells[0].innerHTML = i.toString();
        }
   
    } //清空列表
    function ClearAllSign() {
        if (confirm('确定要清空所有条件吗？')) {
            var signFrame = findObj("SignFrame", document);
            var rowscount = signFrame.rows.length;

            //循环删除行,从最后一行往前删除
            for (i = rowscount - 1; i > 0; i--) {
                signFrame.deleteRow(i);
            }

            //重置最后行号为1
            var txtTRLastIndex = findObj("txtTRLastIndex", document);
            txtTRLastIndex.value = "1";

            //预添加一行
            AddSignRow();
        }
       
    }
    function sele() {
        var kdate = $("#kdate").val();
        var jdate = $("#jdate").val();
        if (kdate == "" || jdate == "") {
            alert("请选择起止时间！");
        }
        else {

            var sqlst = $("input[groups='ye']");
            var sqls = "";
            var length = sqlst.length;
            if (length > 0) {
                for (var i = 0; i < length; i++) {
                    if (i == length - 1) {
                        sqls += sqlst[i].value
                    }
                    else {
                        sqls += sqlst[i].value + " and ";
                    }
            }

            }
            $("#selector").dialog("close");
            LCallBack.Callback(kdate,jdate,sqls);
        }
      
    }
</script>

</head>

<body>
<form id="form1" runat="server">
  
<%-- <table width="1750" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="29" background="../images/1.gif"><table width="300" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="300" class="tittle">当前位置：统计表格</td>
      </tr>
    </table></td>
  </tr>
</table>--%>

<table class="table" border="1">
    <tr>
    <td  style="font:  11px  Verdana, Arial, Helvetica, sans-serif; color:#0161a1; font-size:25px; font-weight:bold; text-align:center; padding-top:10px; padding-bottom:5px;  "  >
    淮安市领导干部下基层"三进三帮"活动数据查询统计表
    <input type="text" id="nmonth" runat="server" style=" display:none" />
     </td>
    </tr>
   </table>
 <div class="selects" style=" width:1750">
<table>
<tr>

<td>
    <asp:DropDownList ID="DropDownList1" runat="server">
    <asp:ListItem Text="--请选择查询类型--"  Value="null">
    </asp:ListItem>
    <asp:ListItem Text="按单位关键字查询"  Value="post">
    </asp:ListItem>
    <asp:ListItem Text="按人员关键字查询"  Value="name">
    </asp:ListItem>
    </asp:DropDownList>
</td>
<td>
<input type="text" id="dw" runat="server" />
</td>

<td>
    <asp:Button ID="Button1" runat="server" Text="查询" CssClass="buttonCss" 
        onclick="Button1_Click1" />

         <input type="button" class="buttonCss" value="筛选" onclick="offren()"/>
    <asp:Button ID="Button2" runat="server" Text="下载" CssClass="buttonCss" 
        onclick="Button2_Click" />
</td>
<td>
        <div id="fileQueue">
        
        </div>
</td>

</tr>

</table>
<table>
<tr>
<td>

</td>
</tr>
</table>
</div>
<nicklee:CallBack runat="server" ID="LCallBack" OnCallback="LCallBack_Callback" PostState="True"
            Width="100%" Height="100%" 
            LoadingPanelFadeDuration="800" LoadingPanelFadeMaximumOpacity="80">
            <Content>
                <asp:Panel ID="LPanel" runat="server">
<table   id="tables"   width="1750" class="utb">
  <tr>
    <td rowspan="3" align="center" class="style1"  >单位</td>
    <td rowspan="3" align="center" class="style1"  >姓名</td>
    <td colspan="6" align="center" class="style1" >深入基层<br />调研情况</td>
    <td colspan="5" align="center" class="style1" >开展大接访情况</td>
    <td colspan="6" align="center" class="style1" >走访慰问困难群众情况</td>
    <td colspan="2" align="center" class="style1" >召开座谈<br />会情况</td>
    <td colspan="2" align="center" class="style1" >形势政策<br />宣讲情况</td>
    <td colspan="2" align="center" class="style1" >帮助基层单位解决问题</td>
     <td  rowspan="3" align="center" class="style1"  width="50">参加<br />劳动<br />（次）</td>
    <td rowspan="3" align="center" class="style1"  width="100">为基层单<br />位和群众<br />办实事情况<br />（件）</td>
    <td rowspan="3" align="center" class="style1"  width="100">为基层单位提供<br />扶持资金金额<br />（元）</td>
  </tr>
  <tr>
    <td rowspan="2" align="center" class="style1"  width="50">下基<br />层活动<br />总天数</td>
    <td rowspan="2" align="center" class="style1"  width="50">下基<br />层调<br />研天数</td>
    <td rowspan="2" align="center" class="style1"  width="50">撰写民情<br />日记篇数</td>
    <td rowspan="2" align="center" class="style1"  width="50">撰写调研<br />报告篇数</td>
    <td colspan="2" align="center" class="style1" >其中</td>
    <td rowspan="2" align="center" class="style1"  width="50">公开接访天数</td>
    <td rowspan="2" align="center" class="style1"  width="50">接待信访件数</td>
    <td rowspan="2" align="center" class="style1"  width="50">已结案信访件数</td>
    <td colspan="2" align="center" class="style1" >其中</td>
    <td rowspan="2" align="center" class="style1"  width="50">困难<br />群众<br />总户数</td>
    <td rowspan="2" align="center" class="style1"  width="50">走访困难<br />群众<br />（户次）</td>
    <td rowspan="2" align="center" class="style1"  width="50">挂钩结对户数</td>
    <td colspan="2" align="center" class="style1" >其中</td>
    <td rowspan="2" align="center" class="style1"  width="50">慰问<br />捐助<br />折合<br />金额<br />（元）</td>
    <td rowspan="2" align="center" class="style1"  width="50">次数</td>
    <td rowspan="2" align="center" class="style1"  width="50">参加<br />人次</td>
    <td rowspan="2" align="center" class="style1"  width="50">次数</td>
    <td rowspan="2" align="center" class="style1"  width="50">参加<br />人次</td>
    <td rowspan="2" align="center" class="style1"  width="100">需要解决的<br />问题</td>
    <td rowspan="2" align="center" class="style1"  width="50">其中已解决</td>
  </tr>
  <tr>
    <td align="center" class="style1"  width="50">走村<br />入户天数</td>
    <td align="center" class="style1"  width="50">驻点住<br />户天数</td>
    <td align="center"  class="style1" width="50">重点<br />信访<br />包案<br />件数</td>
    <td align="center" class="style1"  width="50">重点<br />信访<br />包案<br />完成<br />件数</td>
    <td align="center" class="style1"  width="50">走访挂钩<br />结对户（户次）</td>
    <td align="center" class="style1"  width="50">帮扶挂钩<br />结对户（户次）</td>
  </tr>
  <%--合计--%>
  <%--<tr>
   <td align="center"  style=" text-align:center">合计</td>
   <td class="td" align="center"><%=su[0].ToString()%></td>
  <td class="td" align="center"><%=su[1].ToString()%></td>
  <td class="td" align="center"><%=su[2].ToString()%></td>
   <td class="td" align="center"><%=su[25].ToString()%></td>
  <td class="td" align="center"><%=su[3].ToString()%></td>
  <td class="td" align="center"><%=su[4].ToString()%></td>
  <td class="td" align="center"><%=su[5].ToString()%></td>
  <td class="td" align="center"><%=su[6].ToString()%></td>
    <td class="td" align="center"><%=su[7].ToString()%></td>
  <td class="td" align="center"><%=su[8].ToString()%></td>
  <td class="td" align="center"><%=su[9].ToString()%></td>
    <td class="td" align="center"><%=su[23].ToString()%></td>
   <td class="td" align="center"><%=su[10].ToString()%></td>
 
  <td class="td" align="center"><%=su[24].ToString()%></td>
  <td class="td" align="center"><%=su[11].ToString()%></td>
  
  <td class="td" align="center"><%=su[12].ToString()%></td>
  <td class="td" align="center"><%=su[13].ToString()%></td>
  
  <td class="td" align="center"><%=su[14].ToString()%></td>
  <td class="td" align="center"><%=su[15].ToString()%></td>
  <td class="td" align="center"><%=su[16].ToString()%></td>
  <td class="td" align="center"><%=su[17].ToString()%></td>
  <td class="td" align="center"><%=su[20].ToString()%></td>
  <td class="td" align="center"><%=su[21].ToString()%></td>
  <td class="td" align="center"><%=su[18].ToString()%></td>
  <td class="td" align="center"><%=su[22].ToString()%></td>
  <td class="td" align="center"><%=su[19].ToString()%></td>
   
  
  </tr>--%>
    <asp:Repeater ID="Repeater1" runat="server">
  <ItemTemplate>
  <tr>
 
  <td align="center" class="td"><%# DataBinder.Eval(Container.DataItem, "PostName")%></td>
  <td align="center" class="td"><%# DataBinder.Eval(Container.DataItem, "USERNAME")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "zday")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "XJCDYTS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZXMQRJPS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "dybg")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZCRHTS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZDZHTS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "GKJFTS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "JDXFAJ")%></td>

    <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "yjaxf")%></td>

  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZDXFBAJS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZDXFBAJWCS")%></td>
    <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "kns")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "KNQZZHS")%></td>
    <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ggs")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "WWKNQZQK_YZFHS")%></td>

  

  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "YBFHS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "WWJZZHLJJE")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "ZKZTHCS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "Z_CJRC")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "XSZCXJCS")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "X_CJRC")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "wts")%></td>
    <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "jjs")%></td>
  <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "CJLDTS")%></td>
    <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "sss")%></td>
 <td class="td" align="center"><%# DataBinder.Eval(Container.DataItem, "WJCDWFCZJLJJE")%></td>

  </tr>
  </ItemTemplate>
    </asp:Repeater>
</table>
</asp:Panel>
            </Content>
            <LoadingPanelClientTemplate>
                <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0" border="0"
                    bgcolor="#e0e0e0">
                    <tr style="width: 100%; height: 100%;">
                        <td style="width: 100%; height: 100%; vertical-align: middle; text-align: center;">
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        数据载入中...&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        <img alt="" src="../images/GreenBar.gif" border="0" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
           </LoadingPanelClientTemplate>
         </nicklee:CallBack>
         <div id="selector"  title="高级搜索" style="display:none" >
            <table width="100%">
          <tr>
          <td style=" vertical-align:bottom">
          日期范围
          </td>
          <td>
          起：
          <input type ="text" id="kdate" runat="server" readonly="readonly"  class="required" />
          <img  style="margin-bottom:0px;"  src="../Images/calendar.gif"  onclick="WdatePicker({el:'kdate'})"/>
          </td>
           <td>
          止： <input type ="text" id="jdate" runat="server" readonly="readonly"  class="required" />
          <img  style="margin-bottom:0px;"  src="../Images/calendar.gif"  onclick="WdatePicker({el:'jdate'})"/>
          </td>
            </tr>
            </table>
            <div style=" text-align:left">

             &nbsp;&nbsp;&nbsp;&nbsp;
            
             <input name='txtTRLastIndex' type='hidden' id='txtTRLastIndex' value="1" />

            </div>
            <table>
            <tr >
                <td width="27" >
                
                </td>
                <td width="64" >
                <select id="gjc">
                <option  value="null">
                --请选择--
                </option>
                <option  value="wts" >
               需要解决的
问题件数
                </option>
            <option  value="jjs" >
               已解决的
问题件数
                </option>
                  <option  value="XJCDYTS" >
 下基层调研天数
                </option>
                 <option  value="ZDZHTS" >
驻点住户天数
                </option>
                <option  value="GKJFTS" >
公开接访天数
                </option>
                <option  value="yjaxf" >
已结案信访件数
                </option>
                <option  value="yjaxf" >
已结案信访件数
                </option>
                <option  value="ZDXFBAJS" >
                重点信访包案件数
                </option>
                <option  value="ZDXFBAJS" >
                重点信访包案件数
                </option>
                <option  value="XSZCXJCS" >
               形势政策宣讲次数
                </option>
                <option  value="ZXMQRJPS" >
               撰写民情日记篇数
                </option>
                 <option  value="dybg" >
               撰写调研报告篇数
                </option>
                 <option  value="ZCRHTS" >
            走村入户天数
                </option>
                <option  value="kns" >
            困难群众总户数
                </option>
                <option  value="ggs" >
           挂钩结对户数
                </option>
                
                
                
                </select></td>
                <td width="98" >    
                
                 <select id="tj">
                <option value="null">
                --请选择--
                </option>
                <option  value=">" >
              大于
                </option>
               <option value="<" >
               小于
                </option>
                </select></td>
                <td width="92" ><input type="text"  id="sj" /></td>
                <td width="57" > <input type="button" id="Button4" value="增加条件" onclick="AddSignRow()" /></td>
                <td width="57" ><input type="button" id="Button3" value="执行筛选"  onclick="sele()" /></td>
              </tr>
            </table>
            <div style=" width:100%; overflow:scroll">
            <table width="100%" border="0" cellpadding="2" cellspacing="1" id="SignFrame">
              <tr id="trHeader">
                <td width="27" bgcolor="#96E0E2">序号</td>
                <td width="64" bgcolor="#96E0E2">关键字</td>
                <td width="98" bgcolor="#96E0E2">条件</td>
                <td width="92" bgcolor="#96E0E2">数据</td>
                <td width="57" align="center" bgcolor="#96E0E2">&nbsp;</td>
                <td width="57" align="center" bgcolor="#96E0E2">&nbsp;</td>
              </tr>
             
        </table>

            </div>

</div>

 </form>
</body>
</html>